package isquirrel.beans;


public class Pair implements Comparable<Pair>{
	private Double value = null;
	private Integer id = null;
	private Integer hits = null;
	
	public Pair(Double value, Integer id, Integer hits) {
		this.value = value;
		this.id = id;
		this.hits = hits;
	}

	public Pair(Integer value, Integer id){
		this.value = new Double(value);
		this.id = id;
	}
	
	
	public int compareTo(Pair p) {
		int toreturn = -1;
		if ( p.id == this.id && this.value == p.value ) 
			toreturn = 0;
		else if (this.value > p.value)
			toreturn = 1;
		return toreturn;
	}

	public int hashCode() {
		return this.hashCode();
	}
	
	public double getValue() {
		return this.value;
	}
	public int getId() {
		return this.id;
	}
	
	public int hits(){
		return hits;
	}
	
}
